import {Injectable} from '@angular/core';
import {BaseHttpService} from "../base-http.service";
import {Observable} from "rxjs";

export interface SpecialChemicalsAddEdit {
  id?: number;
  chemicalBombMake: string;
  chemicalForbidNanjing: string;
  chemicalPoison: string;
  chemicalPoisonAcute: string;
  chemicalPoisonMake: string;
  chemicalSupervise: string;
  chemicalSuperviseKey: string;
  chemicalSuperviseSpeciality: string;
  fireDust: string;
}

@Injectable({
  providedIn: 'root'
})
export class SpecialChemicalsService {

  constructor(public http: BaseHttpService) {
  }

  editSpecialChemicals(param: SpecialChemicalsAddEdit): Observable<void> {
    return this.http.put('/identify/chemical', param, {needSuccessInfo: true});
  }

  getSpecialChemicalsDetail(id: number): Observable<SpecialChemicalsAddEdit> {
    return this.http.get(`/identify/chemical/${id}`)
  }

}
